﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WorkStation.Common
{
    public class TestParam
    {
        [DisplayName("GRR模式不检测假镜头SN"), Category("测试"), Description("GRR模式不检测假镜头SN")]
        public bool NoCheckMirrorSN { get; set; } = false;
        [DisplayName("测试前延时"), Category("测试"), Description("测试前延时")]
        public int TestDelayTime { get; set; } = 1000;
        [DisplayName("模拟测试时间(ms*10ms)"), Category("测试"), Description("模拟测试时间(ms*10ms)")]
        public int TestTimeCount { get; set; } = 1000;
        [DisplayName("左一测试Holder名称"), Category("测试"), Description("设定左一测试Holder的名称")]
        public string Left_1HolderName { get; set; } = "";

        [DisplayName("左二测试Holder名称"), Category("测试"), Description("设定左二测试Holder的名称")]
        public string Left_2HolderName { get; set; } = "";

        [DisplayName("右一测试Holder名称"), Category("测试"), Description("设定右一测试Holder的名称")]
        public string Right_1HolderName { get; set; } = "";

        [DisplayName("右二测试Holder名称"), Category("测试"), Description("设定右二测试Holder的名称")]
        public string Right_2HolderName { get; set; } = "";

        [DisplayName("启用测试防护罩"), Category("测试"), Description("设定是否启用测试防护罩：true 启用")]
        public bool UseTestingDoor { get; set; } = true;

        [DisplayName("使用条码中反馈的高度"), Category("测试"), Description("设定是否使用条码中反馈的高度：true 使用")]
        public bool UseHeightOfSN { get; set; } = true;

        public bool[] HoldUsing = new bool[6];
        [DisplayName("屏蔽HOLD_A"), Category("转盘"), Description("屏蔽HOLD_A")]
        public bool HOLD1
        {
            get
            {
                return HoldUsing[0];
            }
            set
            {
                HoldUsing[0] = value;
            }
        }

        [DisplayName("屏蔽HOLD_B"), Category("转盘"), Description("屏蔽HOLD_B")]
        public bool HOLD2
        {
            get
            {
                return HoldUsing[1];
            }
            set
            {
                HoldUsing[1] = value;
            }
        }

        [DisplayName("屏蔽HOLD_C"), Category("转盘"), Description("屏蔽HOLD_C")]
        public bool HOLD3
        {
            get
            {
                return HoldUsing[2];
            }
            set
            {
                HoldUsing[2] = value;
            }
        }

        [DisplayName("屏蔽HOLD_D"), Category("转盘"), Description("屏蔽HOLD_D")]
        public bool HOLD4
        {
            get
            {
                return HoldUsing[3];
            }
            set
            {
                HoldUsing[3] = value;
            }
        }

        [DisplayName("屏蔽HOLD_E"), Category("转盘"), Description("屏蔽HOLD_E")]
        public bool HOLD5
        {
            get
            {
                return HoldUsing[4];
            }
            set
            {
                HoldUsing[4] = value;
            }
        }

        [DisplayName("屏蔽HOLD_F"), Category("转盘"), Description("屏蔽HOLD_F")]
        public bool HOLD6
        {
            get
            {
                return HoldUsing[5];
            }
            set
            {
                HoldUsing[5] = value;
            }
        }

        [DisplayName("点检产品1二维码"), Category("点检"), Description("点检产品1二维码")]
        public string CheckForTest1 { get; set; } = "VCM1";

        [DisplayName("点检产品2二维码"), Category("点检"), Description("点检产品2二维码")]
        public string CheckForTest2 { get; set; } = "VCM2";

        [DisplayName("启用复测"), Category("测试"), Description("启用复测")]
        public bool IsABBEnable { get; set; } = false;

        [DisplayName("探针使用次数"), Category("测试"), Description("探针使用次数")]
        public int[] TotalPinUseCount { get; set; } = new int[4];

        [DisplayName("探针使用次数阈值"), Category("测试"), Description("探针使用次数阈值")]
        public int TotalPinUseCountWarn { get; set; } = 50000;
        [DisplayName("机械手吸取失败报警次数"), Category("测试"), Description("机械手吸取失败报警次数")]
        public int RobotGetPWarnTime { get; set; } = 0;
        [DisplayName("Arm在NG区放料下降相对高度(mm)"), Category("测试"), Description("Arm在NG区放料下降相对高度(mm)")]
        public double ArmZHValuePutInNG { get; set; } = 10;
        [DisplayName("Arm在NG区放料下降相对高度使用速度(mm/s)"), Category("测试"), Description("Arm在NG区放料下降相对高度使用速度(mm/s)")]
        public double ArmZHValueSpeedPutInNG { get; set; } = 10;
        [DisplayName("Arm在精定位放料下降相对高度(mm)"), Category("测试"), Description("Arm在测试机放料下降相对高度(mm)")]
        public double ArmZHValuePutInPrecision { get; set; } = 10;
        [DisplayName("Arm在精定位放料下降相对高度使用速度(mm/s)"), Category("测试"), Description("Arm在测试机放料下降相对高度使用速度(mm/s)")]
        public double ArmZHValueSpeedPutInPrecision { get; set; } = 10;
        [DisplayName("Arm在测试机放料下降相对高度(mm)"), Category("测试"), Description("Arm在测试机放料下降相对高度(mm)")]
        public double ArmZHValuePut { get; set; } = 10;
        [DisplayName("Arm在测试机放料下降相对高度使用速度(mm/s)"), Category("测试"), Description("Arm在测试机放料下降相对高度使用速度(mm/s)")]
        public double ArmZHValueSpeedPut { get; set; } = 10;
        [DisplayName("Arm在测试机取料抬高相对高度(mm)"), Category("测试"), Description("Arm在测试机取料抬高相对高度(mm)")]
        public double ArmZHValue { get; set; } = 5;
        [DisplayName("Arm在测试机取料抬高相对高度使用速度(mm/s)"), Category("测试"), Description("Arm在测试机取料抬高相对高度使用速度(mm/s)")]
        public double ArmZHValueSpeed { get; set; } = 10;
        [DisplayName("Arm在测试机取料抬高破真空时间(ms)"), Category("测试"), Description("Arm在测试机取料抬高破真空时间(ms)")]
        public int ArmBreakVacTime { get; set; } = 20;
        [DisplayName("Arm吸取失败报警次数"), Category("测试"), Description("Arm吸取失败报警次数")]
        public int ArmGetPWarnVacTime { get; set; } = 2;
        [DisplayName("UPH(平均个数)"), Category("测试"), Description("UPH(平均个数)")]
        public int UPHCount { get; set; } = 2;
    }
}
